package com.moniteach.server.db.bo;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import org.json.JSONObject;

import com.moniteach.utils.Resource;

@PersistenceCapable
public class LessonTheme {
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;

	@Persistent
	private Long theme;

	@Persistent
	private Long lesson;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getTheme() {
		return theme;
	}

	public void setTheme(Long theme) {
		this.theme = theme;
	}

	public Long getLesson() {
		return lesson;
	}

	public void setLesson(Long lesson) {
		this.lesson = lesson;
	}

	public LessonTheme(Long theme, Long lesson) {
		super();
		this.theme = theme;
		this.lesson = lesson;
	}

	public JSONObject toJSONObject() {
		JSONObject jo = new JSONObject();
		jo.put(Resource.Const.lesson, lesson);
		jo.put(Resource.Const.theme, theme);
		return jo;
	}
}